package com.darrenchan

import java.util.Arrays

object ArrayDemo {
  def main(args: Array[String]): Unit = {
    val z = new Array[String](3)
    z(0) = "陈驰"
    z(1) = "石泽涛"
    z(2) = "xxx"
    for(zz <- z){
      println(zz)
    }



    var arr = Array(1,2,3,4,5,6,7,8,9,0)
    println(arr.length)
    println(Arrays.toString(arr))


    for(i <- 0 to arr.length - 1) {
      println(i + "---------" + arr(i))
    }


    var arr2 = new Array[Char](3)
    println(Arrays.toString(arr2))
  }
}
